package com.example.ymm.modules1.mapper.my.user;

import com.example.ymm.base.CoreMapper;
import com.example.ymm.modules1.entity.my.user.KqDakaLog;
import com.example.ymm.modules1.entity.my.user.KqDayLog;
import com.example.ymm.modules1.query.kq.KqApproveLogQueryCriteria;
import com.example.ymm.modules1.query.kq.KqDakaLogQueryCriteria;
import com.example.ymm.modules1.query.kq.KqGroupRuleQueryCriteria;
import com.example.ymm.modules1.service.dto.heng.kq.ViewKqDakaLog;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface KqDakaLogMapper extends CoreMapper<KqDakaLog> {

    /**
     * 用户打卡视图-手机端
     * @param criteria
     * @return
     */
    List<ViewKqDakaLog> phoneDakaList(KqDakaLogQueryCriteria criteria);



    /**
     * 用户打卡视图-pc
     * @param criteria
     * @return
     */
    List<ViewKqDakaLog> pcDakaList(KqDakaLogQueryCriteria criteria);

    /**
     * 判断某个车间小组某一天有没有打卡
     * @param criteria
     * @return
     */
    Integer userDakaCount(KqDakaLogQueryCriteria criteria);


    /**
     * 审批打卡视图
     * @param criteria
     * @return
     */
    List<ViewKqDakaLog> approvalDakaList(KqApproveLogQueryCriteria criteria);


    /**
     * 根据小组id查找打卡记录
     * @param criteria
     * @return
     */
    List<KqDakaLog> getByGroupId(KqDakaLogQueryCriteria criteria);


    KqDayLog oneByGroupId(KqDakaLogQueryCriteria criteria);

    List<KqDayLog> dayListByGroupId(KqDakaLogQueryCriteria criteria);


}